The present invention generally relates to slot detecting apparatuses, and more particularly to a slot detecting apparatus which is applied to an industrial robot such as a painting robot and is suited for detecting a slot of a workpiece.
Recently, a painting robot is used to automatically paint the inside of a workpiece having a door, such as a locker. The painting robot has a painting unit provided at the tip end of an arm, and a rod for engaging and opening the door of the workpiece together with the painting unit. When the workpieces are conveyed, the workpieces do not necessarily assume the same state. In other words, the workpieces are not all necessarily conveyed with the respective doors closed, and some workpieces may be conveyed with the respective doors open halfway, for example. Thus, when the painting robot opens the door of a workpiece so as to paint the inside of the workpiece, it is necessary to detect the position of the door so that the painting robot can discriminate the position where the door may be engaged.
Accordingly, there is a conventional detecting apparatus which detects a window frame of the door, by using the fact that the door has a window frame made up of a pair of window frame parts which define a slot for receiving a glass window. This conventional detecting apparatus comprises a light emitting element and a light receiving element, and is designed to detect a window frame by noting that the light emitted from the light emitting element is not reflected at the slot but is reflected by the pair of window frame parts which define the slot. When detecting a window frame, an output level of the light receiving element is compared with a predetermined threshold level. It is detected that the light emitted from the light emitting element is reflected by a window frame part and a window frame detection signal is produced from the detecting apparatus, when the output level of the light receiving element exceeds the predetermined threshold level. The painting robot operates in a predetermined sequence responsive to the output detection signal of the detecting apparatus.
However, the reflection factor of the window frame differs depending on the color of the workplace. For this reason, when the color of the workpiece is known, it is possible to set the threshold level which is in accordance with the reflection factor of the color of the workpiece. However, in a case where workpieces of different colors are conveyed at predetermined intervals, there is a problem in that the threshold level must be changed in accordance with the color of the workpiece every time the color of the workpiece changes. Further, in a case where workpieces of different colors are conveyed at random and the threshold level is fixed, there is a disadvantage in that only the window frames of workpieces having predetermined colors can be detected and the window frames of workpieces having other colors cannot be detected.